import Cookies from 'js-cookie'

const TokenKey = 'hrsaas-ihrm-token' // token的键
const timeKey = 'hrsaas-timestamp-key'

// 获取token
export function getToken() {
  return Cookies.get(TokenKey)
}

// 设置token
export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

// 删除token
export function removeToken() {
  return Cookies.remove(TokenKey)
}

// 获取时间戳
export function getTimestamp() {
  return Cookies.get(timeKey)
}

// 设置时间戳
export function setTimestamp() {
  return Cookies.set(timeKey, Date.now())
}
